{% extends "manage/layout.html" %}

{% set page_title = '机构首页公告通知' %}

{% block css %}
<style type="text/css">
    th:last-child, td:last-child{
        width: 500px;
    }
    .fieldset .form-group .form-control-ck{
        display: inline-block;
        vertical-align:top;
    }
</style>
{% endblock %}
{% block content %}
<div class="m-content">
    <form class="form-horizontal" method="post">
        {{ form.hidden_tag() }}
        <fieldset class="fieldset">
            <legend>机构信息</legend>
            {% from "common/_formhelper.html" import render_field %}
            {{ render_field(form.oversea, class_="form-control") }}
            {{ render_field(form.title, class_="form-control", required=True) }}
            {{ render_field(form.description, class_="form-control", required=True) }}
        <div class="form-group">
            <label class="control-label" for="content">{{ form.content.label }}</label>
            <div class="form-control-ck">
                {{ form.content(class='ckeditor') }}
            </div>
        </div>
        <button class="btn btn-primary  btn-lg">提交</button>
        </fieldset>
    </form>
</div>
{% endblock %}
{% block js %}
<script src="{{url_for('static', filename='ckeditor/ckeditor.js')}}"></script>
    <script type="text/javascript">
        CKEDITOR.config.baseFloatZIndex = 100101;
        CKEDITOR.replace(
            "content", {
                filebrowserUploadUrl: '{{ url_for('manage.ckupload') }}'
            }
        );
    </script>
{% endblock %}
